def fibo(a=-1,b=1,upto=4000000)
	array=[]
	while a+b<upto
		a,b=b,a+b
		array<<b
	end
	return array
end

sum=0
fibo().each do |a|
	sum+=a if a%2==0
end

puts sum
